﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Forms;
using System.Threading;
using WMS_Model;
using WMS_Business;
using Newtonsoft.Json;

namespace WMSFlatApp
{
    public partial class FrmHu : Form
    {
        //private RequestManage webCom;
        //HttpWeb http = new HttpWeb();
        RequestManage request = new RequestManage();
        public string Rise;
        //List<StationsTable> stations;
        public FrmHu(string workName)   //窗体构造方法实例化
        {
            InitializeComponent();
            cmbStation.DataSource = request.Stationlist();
            cmbMaterial.DataSource = request.Materiallist();
            Rise = workName;
        }



        //呼料提交
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            string End = cmbStation.SelectedValue.ToString();
            string Material = cmbMaterial.SelectedValue.ToString();
            string type = TitleText.Text.Substring(2, 2);
            int Number = int.Parse(txtNumber.Text);

            string result = request.TasksAdd(Rise, End, Material, type, Number);
            System.Windows.MessageBox.Show("呼料" + result);
            this.Close();
        }
    }
}
